{% extends "base.html" %}
{% load staticfiles %}

{% block title %}
图灵课程 - 主页
{% endblock %}


{% block style %}
{% endblock %}

{% block content %}

<div class="container" style="font-family: Hiragino Sans GB W3">
    <div class="row">
        <br>
       <div class="col-md-10">
         <div class="container question" style="margin-top: 20px; width: 100%;">

         	<ul class="nav nav-tabs" role="tablist" id="myTab">
         		<li role="presentation" ><a href="#news" id="news-tab" aria-controls="news" data-toggle="tab" class="active">问题列表</a></li>
         		<li role="presentation" ><a href="#basics" id="basics-tab" aria-controls="basics" data-toggle="tab">新闻资讯</a></li>
         		<li role="presentation" ><a href="#topics" id="topics-tab" aria-controls="topics" data-toggle="tab">活动公告</a></li>
         	</ul>


         <div id="myTabContent" class="tab-content"  align="center" style="margin-top: 10px">
         <div role="tabpanel" class="tab-pane fade in active" id="news" aria-labelledBy="news-tab">
           <div class="panel panel-default" style="border: none;">

             <div class="panel-body">
                 <table id="DataTable_QuestionList" class="table" style="border: none;">
                     <thead>
                         <tr style="display: none;">
                             <th width="5%" style="text-align: center;"></th>
                             <th width="95%" style="text-align: center;"></th>
                         </tr>
                     </thead>
                      <tbody >

                         {% for question in questionSet %}
                         <tr>
                             <td style="text-align: center;"></td>
                             <td>
                                 <div class="question-summary" id="question-summary-{{question.QuestionID}}}">
                                     <div onclick="" class="sign">
                                         <div class="sum_signs">
                                             <div class="mini-counts">{{question.PraiseNum}}</div>
                                             <div class="title_signs" title="点赞次数"><span class="glyphicon glyphicon-thumbs-up"></span></div>
                                         </div>
                                         <div class="sum_signs">
                                             <div class="mini-counts"><span title="">{{question.AnswerNum}}</span></div>
                                             <div class="title_signs" title="评论次数"><span class="glyphicon glyphicon-edit"></span></div>
                                         </div>
                                         <div class="sum_signs" style="margin-right: 10px">
                                             <div class="mini-counts"><span title="">{{question.BrowseNum}}</span></div>
                                             <div class="title_signs" title="浏览次数"><span class="glyphicon glyphicon-eye-open"></span></div>
                                         </div>
                                     </div>

                                     <div class="summary">
                                         <a style="text-decoration:none; " href="QuestionDetails/?id={{question.QuestionID}}" class="question-hyperlink" title="">
                                             <span class="glyphicon glyphicon-question-sign"></span> {{question.QuestionAbstract}} <strong style="color: #d0d0d0;">[{{ question.QuizzerName }}]</strong>
                                         </a>
                                         <div class="sum_tags">
                                             {% for tag in question.tags %}
                                             <a class="sum_post-tag" rel="" style="text-decoration:none;cursor:default;">{{tag}}</a>
                                             {% endfor %}

                                             {% if not question.tags %}
                                             <a href="#" class="sum_post-tag" rel="" style="text-decoration:none;">未设置标签</a>
                                             {% endif %}

                                             <div class="started pull-right" style="color:  #313c2c;text-align: bottom"><span title="{{question.askDate}}" class="relativetime">{{question.AskDate}}</span>
                                             </div>
                                         </div>
                                     </div>
                                 </div>
                             </td>

                         </tr>
                         {% endfor %}
                       </tbody>
                 </table>
             </div>
           </div>

         </div>

         <div role="tabpanel" class="tab-pane fade" id="basics" aria-labelledBy="basics-tab">
         		<div style="color: inherit; padding: 15px" align="center" class="basics_info container">
              <div class="panel panel-default" style="border: none;">
                <div class="panel-body">
                    <table id="DataTable_QuestionList" class="table" style="border: none;">
                        <thead>
                            <tr style="display: none;">
                                <th width="5%" style="text-align: center;"></th>
                                <th width="95%" style="text-align: center;"></th>
                            </tr>
                        </thead>
                         <tbody >

                            {% for news in newsSet %}
                            <tr>
                                <td style="text-align: center;"></td>
                                <td>
                                    <div class="question-summary" id="question-summary-{{news.NewsID}}}">


                                        <div class="summary">
                                            <a style="text-decoration:none; " href="QuestionDetails/?id={{news.NewsID}}" class="question-hyperlink" title="">
                                                <span class="glyphicon glyphicon-question-sign"></span> {{news.Title}} <strong style="color: #d0d0d0;">[{{ news.UserID }}]</strong>
                                            </a>
                                            <div class="sum_tags">

                                                <div class="started pull-right" style="color:  #313c2c;text-align: bottom"><span title="{{news.createDate}}" class="relativetime">{{news.CreateDate}}</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </td>

                            </tr>
                            {% endfor %}
                          </tbody>
                    </table>
                </div>
              </div>


         		</div>

         </div>
         <div role="tabpanel" class="tab-pane fade" id="topics" aria-labelledBy="topics-tab">
         	<div class="topics">


          </div>

         </div>
         <div class="panel panel-default" style="border: none;">
           <div class="panel-body">
               <table id="DataTable_QuestionList" class="table" style="border: none;">
                   <thead>
                       <tr style="display: none;">
                           <th width="5%" style="text-align: center;"></th>
                           <th width="95%" style="text-align: center;"></th>
                       </tr>
                   </thead>
                    <tbody >

                       {% for news in announceSet %}
                       <tr>
                           <td style="text-align: center;"></td>
                           <td>
                               <div class="question-summary" id="question-summary-{{news.NewsID}}}">


                                   <div class="summary">
                                       <a style="text-decoration:none; " href="QuestionDetails/?id={{news.NewsID}}" class="question-hyperlink" title="">
                                           <span class="glyphicon glyphicon-question-sign"></span> {{news.Title}} <strong style="color: #d0d0d0;">[{{ news.UserID }}]</strong>
                                       </a>
                                       <div class="sum_tags">

                                           <div class="started pull-right" style="color:  #313c2c;text-align: bottom"><span title="{{news.createDate}}" class="relativetime">{{news.CreateDate}}</span>
                                           </div>
                                       </div>
                                   </div>
                               </div>
                           </td>

                       </tr>
                       {% endfor %}
                     </tbody>
               </table>
           </div>
         </div>
         </div>



          <div style="float:right; font-weight:12px;">
               <script src="http://s95.cnzz.com/stat.php?id=1261512901&web_id=1261512901 " language="JavaScript">

               </script>

            </div>
       </div>


        <!--下拉菜单
        <div class="col-md-1">
            <div style="padding-top: 5px;">
                <li class="dropdown">
                    <a href="" class="dropdown-toggle " data-toggle="dropdown" style="color: var(--theme-dark); text-decoration: none;">排序<span class="caret"></span></a>
                    <ul class="dropdown-menu pull-right" style="font-size: 11px" role="menu">
                        <li><a href="#">按提问时间排序</a></li>
                        <li><a href="#">按更新时间排序</a></li>
                        <li class="divider"></li>
                        <li><a href="#">按浏览次数排序</a></li>
                    </ul>
                </li>
            </div>
        </div>
    -->
      <div class="col-md-2" id="rightpart">



     <div id="message">
       <h5>信息学院电脑义诊</h5>
       <p class="context">电脑义诊活动火热进行中...</p>
       <table>
        <tr>
            <td style="width:5px">
                <span class="glyphicon glyphicon-time"></span></td>
                <td><p> 2017.3.19-2017.4.30</p></td>
            </tr>
            <tr>
                <td style="width:5px">
                   &nbsp;</td>
                   <td><p>每周日15：30-17：30</p></td>
               </tr>
               <tr>
                <td style="width:5px">
                    <span class="glyphicon glyphicon-map-marker"></span></td>
                    <td><p> 厦大学生公寓二期食堂</p>
                    </td>
                </tr>
            </table>
            <div class="booking "><a href="/AppointmentPage/"><span class="glyphicon glyphicon glyphicon-share-alt"></span>我想预约 &nbsp; </a></div>
            <div class="clear"></div>
        </div>

        <div id="sort">
           <h5><span class="glyphicon glyphicon-hand-right"></span> 积分排名榜 <span class="glyphicon glyphicon-hand-left"></span></h5>
           {% for user in topUser %}
           <p style="text-align:left;">第 {{forloop.counter}} 名：{{user.NickName}}【<span style="color: #930000;">{{user.UserPoints}}</span>】</p>
           {% endfor %}
       </div>
   </div>
   </div>
</div>

{% endblock %}



{% block other_script %}
{% endblock %}
